package com.tz.service;

import com.tz.dao.ProductDao;
import com.tz.dao.ProductDaoImpl;
import com.tz.entity.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2016/7/27.
 */
@Service
public class ProductServiceImpl implements ProductService{

    @Autowired
    private ProductDao productDao;

    @Override
    public List<Product> findProduct() {
        return productDao.findProduct();
    }

    @Override
    public List<Product> findProductBy(String catename) {
        return productDao.findProductBy(catename);
    }

    @Override
    public Product findProductById(long id) {
        return null;
    }

    @Override
    public void saveProducts(Product p) {
        productDao.saveProduct(p);
    }
}
